{extend name="member/common/shop_layout" /}

{block name="content"}

<div class="ncm-flow-layout">
  <div class="ncm-flow-container">
    <div class="title">
      <h3>物流详情</h3>
    </div>
    <div class="alert alert-block alert-info">

      <ul><li><strong>收货信息：</strong><?php echo $order_info['extend_order_common']['reciver_name']?>&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $order_info['extend_order_common']['reciver_info']['phone'];?>&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $order_info['extend_order_common']['reciver_info']['address'];?></li>
        <li><strong>我的留言：</strong><?php echo $order_info['extend_order_common']['order_message']; ?></li>
        <li><strong>发货信息：</strong><?php echo $daddress_info['seller_name']; ?>&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $daddress_info['telphone'];?>&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $daddress_info['area_info'];?>&nbsp;&nbsp;<?php echo $daddress_info['address'];?>&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $daddress_info['company'];?></li></ul>
    </div>
    <div class="tabmenu">
      <ul class="tab pngFix">
        <li class="active"><a>物流动态</a></li>
      </ul>
    </div>
    <ul class="express-log" id="express_list">
      <?php if($order_info['extend_order_common']['shipping_time']) { ?>
      <li class="loading">加载中...</li>
      <?php } ?>
    </ul>
    <div class="alert">以上部分信息来自于第三方，仅供参考，如需准确信息可联系卖家或物流公司</div>
  </div>
  <div class="ncm-flow-item">
    <div class="title">订单信息</div>
    <div class="item-goods">
      <?php if(is_array($order_info['extend_order_goods']) and !empty($order_info['extend_order_goods'])) { foreach($order_info['extend_order_goods'] as $val) { ?>
      <dl>
        <dt>
        <div class="ncm-goods-thumb-mini"><a href="{:url('shop/Goods/index',array('goods_id'=>$val['goods_id']))}" target="_blank"><img src="<?php echo thumb($val,'60'); ?>" onMouseOver="toolTip('<img src=<?php echo thumb($val,'240'); ?>>')" onMouseOut="toolTip()"/></a></div>
        </dt>
        <dd><a href="{:url('shop/Goods/index',array('goods_id'=>$val['goods_id']))}" target="_blank"><?php echo $val['goods_name']; ?></a> <span class="rmb-price"><?php echo ncPriceFormat($val['goods_price']); ?>&nbsp;*&nbsp;<?php echo $val['goods_num']; ?>
          <?php if ($val['goods_type'] != 1) {?>
          <font color="#AAA">（<?php echo orderGoodsType($val['goods_type']);?>）</font>
          <?php } ?>
        </span></dd>
      </dl>
      <?php } } ?>
    </div>
    <div class="item-order">
      <dl>
        <dt>运费：</dt>
        <dd><?php echo $order_info['shipping_fee'];?></dd>
      </dl>
      <dl>
        <dt>订单总额：</dt>
        <dd><strong>￥<?php echo $order_info['order_amount'];?></strong></dd>
      </dl>
      <dl>
        <dt>订单编号：</dt>
        <dd><a href="javascript:void(0);"><?php echo $order_info['order_sn']; ?></a><a href="javascript:void(0);" class="a">更多<i class="icon-angle-down"></i>
          <div class="more"> <span class="arrow"></span>
            <ul>
              <li>支付方式：<span><?php echo $order_info['payment_name']; ?>
                <?php if($order_info['payment_code'] != 'offline' && !in_array($order_info['order_state'],array(ORDER_STATE_CANCEL,ORDER_STATE_NEW))) { ?>
                (<?php echo '付款单号';?>：<?php echo $order_info['pay_sn']; ?>)
                <?php } ?>
                </span> </li>
              <li>下单时间：<span><?php echo date('Y-m-d H:i:s',$order_info['add_time']);?></span></li>
              <?php if(intval($order_info['payment_time'])) { ?>
              <li>付款时间：<span><?php echo date("Y-m-d H:i:s",$order_info['payment_time']); ?></span></li>
              <?php } ?>
              <?php if($order_info['extend_order_common']['shipping_time']) { ?>
              <li>发货时间：<span><?php echo date("Y-m-d H:i:s",$order_info['extend_order_common']['shipping_time']); ?></span></li>
              <?php } ?>
              <?php if(intval($order_info['finnshed_time'])) { ?>
              <li>完成时间：<span><?php echo date("Y-m-d H:i:s",$order_info['finnshed_time']); ?></span></li>
              <?php } ?>
            </ul>
          </div>
        </a></dd>
      </dl>
      <dl>
        <dt>物流单号：</dt>
        <dd><?php echo $order_info['shipping_code']; ?><a href="<?php echo $e_url;?>" class="a" target="_blank"><?php echo $e_name;?></a></dd>
      </dl>
      <dl class="line">
        <dt>商&nbsp;&nbsp;家：</dt>
        <dd><?php echo $store_info['store_name'];?><a href="javascript:void(0);" class="a">更多<i class="icon-angle-down"></i>
          <div class="more"><span class="arrow"></span>
            <ul>
              <li>所在地区：<span><?php echo $store_info['area_info'].'&nbsp;'.$store_info['store_address'];?></span></li>
              <li>联系电话：<span><?php echo $store_info['store_phone'];?></span></li>
            </ul>
          </div>
        </a>
          <div><span member_id="<?php echo $store_info['member_id'];?>"></span>
            <?php if (!empty($store_info['store_qq'])) { ?>
            <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=<?php echo $store_info['store_qq'];?>&site=qq&menu=yes" title="QQ: <?php echo $store_info['store_qq'];?>"><img border="0" src="http://wpa.qq.com/pa?p=2:<?php echo $store_info['store_qq'];?>:52" style=" vertical-align: middle;"/></a>
            <?php } ?>
            <?php if (!empty($output['store']['store_ww'])) { ?>
            <a target="_blank" href="http://amos.im.alisoft.com/msg.aw?v=2&uid=<?php echo $store_info['store_ww'];?>&site=cntaobao&s=2&charset=<?php echo CHARSET;?>"  class="vm" ><img border="0" src="http://amos.im.alisoft.com/online.aw?v=2&uid=<?php echo $store_info['store_ww'];?>&site=cntaobao&s=2&charset=<?php echo CHARSET;?>" alt="Wang Wang"  style=" vertical-align: middle;"/></a>
            <?php } ?>
          </div>
        </dd>
      </dl>
    </div>
  </div>
</div>

<script type="text/javascript" src="__SITE_RESOURCE__/js/jquery.poshytip.min.js" charset="utf-8"></script>
<script>
    $(function(){
        //Ajax提示
        $('.tip').poshytip({
            className: 'tip-yellowsimple',
            showTimeout: 1,
            alignTo: 'target',
            alignX: 'center',
            alignY: 'bottom',
            offsetX: 5,
            offsetY: 0,
            allowTipHover: false
        });
        //var_send = '<br/><?php echo date("Y-m-d H:i:s",$order_info['extend_order_common']['shipping_time']); ?>&nbsp;&nbsp;卖家已发货';
        $.getJSON('<?php echo url("member/Order/get_express");?>?e_code=<?php echo $e_code?>&shipping_code=<?php echo $order_info['shipping_code']?>&t=<?php echo random(7);?>',function(data){
            if(data){
                data = data.join('<br/>');
                $('#express_list').html(data).next().css('display','');
            }else{
                $('#express_list').html("");
            }
        });
    });
</script>
{/block}

